# encoding=utf-8
def handle(infile, outfile):
    fp = open(infile, 'r', encoding='utf-8')
    fout = open(outfile, 'w', encoding='utf-8')
    for line in fp.readlines():
        line = line.strip()
        if not line:
            continue
        # num1 = float(line.split(' ')[1].split(',')[0])
        # num2 = float(line.split(' ')[2])
        # if (num1 >= 9.5 and num1 <= 12.5) and (num2 >= 9.5 and num2 <= 12.5):
        if (("原句：" in line) | ("生成的句子：" in line)):
            fout.write('%s\n' % line)
    fp.close()
    fout.close()


if __name__ == '__main__':
    infile = 'g:/##.txt'
    outfile = 'g:/##.txt'
    handle(infile, outfile)
